<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="../css预编译/bb/aa.css">
  </head>
  <body>
    <div id="app">
      <!-- <input type="text" v-model="val" @keydown.13="handclick" /> -->
      <div class="father" @click="handleParent()">
             <div class="children" @click.stop="handleChild()"></div>
      </div>
      <a href="http://chst.vip" @click.prevent="handleok">go</a>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
    <script>
      //按键修饰符
      //.stop 阻止冒泡
      //.prevent 阻止默认行为
      //.native 触发dom原生事件
      let vm = new Vue({
        el: "#app",
        data: {
          val: "",
        },
        methods: {
          handclick() {
            console.log(this.val);
          },
          handleParent(){
               console.log("我是父亲")
          },
          handleChild(){
              console.log("我是儿子")
          },
          handleok(){
            console.log("奔跑的胖子")
          }
        },
      });
    </script>
  </body>
</html>
